package com.framework.spring.bpp.bean;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
@Slf4j(topic = "e")
public class BeanPostProcessorNoraml implements BeanPostProcessor, InitializingBean {

	@Autowired
	private BeanPostProcessorService beanPostProcessorService;

	@PostConstruct
	public void postConstruct() {
		log.info("BeanPostProcessorNoraml postConstruct--{}", beanPostProcessorService);
	}

	public BeanPostProcessorNoraml() {
		log.info("BeanPostProcessorNoraml construct");
	}

	public void printf() {
		log.info("BeanPostProcessorNoraml.printf-{}", beanPostProcessorService);
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		log.info("BeanPostProcessorNoraml.afterPropertiesSet--{}", beanPostProcessorService);
	}
}
